<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增用工单位合同')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<style>
    .jltable{
        margin: auto;
    }
    .jltable th,td{
        min-height: 40px;
        min-width: 50px;
        border: 1px solid #eee;
        padding: 10px;
    }
</style>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-gsht-add">
            <h4 class="form-header h4">基本信息</h4>
            <table class="jltable">
                <tbody>
                     <tr>
                         <td><label class=" control-label is-required">甲方</label></td>
                         <td><input name="jf" class="form-control" type="text" required></td>
                         <td style="width: 70px"></td>
                         <td> <label class=" control-label">乙方</label></td>
                         <td><input name="yf" class="form-control" type="text"></td>
                     </tr>
                     <tr>
                         <td><label class=" control-label">甲方编号</label></td>
                         <td><input name="jfbh" class="form-control" type="text"></td>
                         <td style="width: 70px"></td>
                         <td>  <label class=" control-label">乙方编号</label></td>
                         <td><input name="yfbh" class="form-control" type="text"></td>
                     </tr>
                    <tr>
                        <td> <label class=" control-label">甲方代表</label></td>
                        <td><input name="jfdb" class="form-control" type="text"></td>
                        <td style="width: 70px"></td>
                        <td> <label class=" control-label">乙方代表</label></td>
                        <td><input name="yfdb" class="form-control" type="text"></td>
                    </tr>
                    <tr>
                        <td><label class=" control-label">甲方电话</label></td>
                        <td><input name="jfdh" class="form-control" type="text"></td>
                        <td style="width: 70px"></td>
                        <td><label class=" control-label">乙方电话</label></td>
                        <td><input name="yfdh" class="form-control" type="text"></td>
                    </tr>
                </tbody>
            </table>

            <h4 class="form-header" style="margin-top: 20px">合同信息</h4>
            <table class="jltable">
                <tbody>
                    <tr>
                        <td> <label class=" control-label">合同编号</label></td>
                        <td><input name="htbh" class="form-control" type="text"></td>
                        <td><label class=" control-label">签订时间</label></td>
                        <td>
                            <div class="input-group date">
                                <input name="qdsj" class="form-control" placeholder="yyyy-MM-dd" type="text">
                                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td><label class="control-label">合同类型</label></td>
                        <td>
                            <select name="htlx" class="form-control" th:with="type=${@dict.getType('pqhtlx')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </td>
                        <td><label class="control-label">合同期限</label></td>
                        <td><input name="htqx" class="form-control" type="text"></td>
                    </tr>
                    <tr>
                        <td> <label class=" control-label">生效时间</label></td>
                        <td>
                            <div class="input-group date">
                                <input name="sxsj" class="form-control" placeholder="yyyy-MM-dd" type="text">
                                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            </div>
                        </td>
                        <td><label class="control-label">结束时间</label></td>
                        <td>
                            <div class="input-group date">
                                <input name="jssj" class="form-control" placeholder="yyyy-MM-dd" type="text">
                                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>  <label class=" control-label">合同金额</label></td>
                        <td><input name="htje" class="form-control" type="text"></td>
                        <td></td><td></td>
                    </tr>
                </tbody>

            </table>


            <h4 class="form-header" style="margin-top: 20px">业务信息</h4>
            <table class="jltable">
                <tbody>
                    <tr>
                        <td> <label class="control-label">发薪周期</label></td>
                        <td>
                            <select name="fxzq" class="form-control " th:with="type=${@dict.getType('pqfxzq')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </td>
                        <td></td>
                        <td><label class=" control-label">服务费标准</label></td>
                        <td><input name="fwfbz" class="form-control" type="text"></td>
                    </tr>
                    <tr>
                        <td><label class=" control-label">工资发放日</label></td>
                        <td><input name="gzffr" class="form-control" type="text"></td>
                        <td></td>
                        <td><label class=" control-label">参保标准</label></td>
                        <td><input name="cbbz" class="form-control" type="text"></td>
                    </tr>
                    <tr>
                        <td><label class="control-label">招聘人数</label></td>
                        <td><input name="zprs" class="form-control" type="text"></td>
                        <td></td>
                        <td><label class="control-label">费用结算日</label></td>
                        <td><input name="fyjsr" class="form-control" type="text"></td>
                    </tr>
                    <tr>
                        <td><label class="control-label">签约报价</label></td>
                        <td><input name="qybj" class="form-control" type="text"></td>
                        <td></td>
                        <td><label class="control-label">考勤提供日</label></td>
                        <td><input name="kqtgr" class="form-control" type="text"></td>
                    </tr>
                    <tr>
                        <td><label class="control-label">保底工时</label></td>
                        <td><input name="bdgs" class="form-control" type="text"></td>
                        <td></td>
                        <td><label class="control-label">休假安排</label></td>
                        <td><input name="xjap" class="form-control" type="text"></td>
                    </tr>
                    <tr>
                        <td><label class="control-label">保险服务</label></td>
                        <td><input name="bxfw" class="form-control" type="text"></td>
                        <td></td>
                        <td><label class=" control-label">结算方式</label></td>
                        <td><input name="jsfs" class="form-control" type="text"></td>
                    </tr>
                    <tr>
                        <td> <label class="control-label">合同内容</label></td>
                        <td colspan="4"> <textarea name="htnr" class="form-control" type="text"></textarea></td>
                    </tr>
                    <tr>
                        <td><label class="control-label">相关文件</label></td>
                        <td colspan="4">
                            <input type="hidden" name="xgwj">
                            <div class="file-loading">
                                <input class="form-control file-upload" id="xgwj" name="file" type="file">
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>

            <h4 class="form-header" style="margin-top: 20px">公帐信息</h4>
            <table class="jltable">
                <tbody>
                    <tr>
                        <td><label class="control-label">开户行</label></td>
                        <td><input name="khh" class="form-control" type="text"></td>
                        <td style="width: 95px"></td>
                        <td><label class="control-label">公司账号</label></td>
                        <td><input name="gszh" class="form-control" type="text"></td>
                    </tr>
                </tbody>
            </table>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: bootstrap-fileinput-js"/>
    <script th:inline="javascript">
        var prefix = ctx + "lwpq/gsht"
        $("#form-gsht-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-gsht-add').serialize());
            }
        }

        $("input[name='qdsj']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='sxsj']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='jssj']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $(".file-upload").fileinput({
            uploadUrl: ctx + 'common/upload',
            maxFileCount: 1,
            autoReplace: true
        }).on('fileuploaded', function (event, data, previewId, index) {
            $("input[name='" + event.currentTarget.id + "']").val(data.response.url)
        }).on('fileremoved', function (event, id, index) {
            $("input[name='" + event.currentTarget.id + "']").val('')
        })
    </script>
</body>
</html>